/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main;

import cards.LimitedCard;
import enums.CardTypes;
import cards.StorageCard;
import cards.TerminalCard;
import metro.MetroSystem;
import metro.Tourniquet;

/**
 *
 * @author Oksana_Moroz
 */
public class Main {

    public static void main(String[] args) {
        MetroSystem system = new MetroSystem();
        Tourniquet tourniquet = system.getTourniquet();

        LimitedCard ftc = system.getFiveTripsCard(CardTypes.PUPIL);
        TerminalCard mc = system.getMonthCard(CardTypes.STUDENT);
        StorageCard sc = system.getStorageCard();
        TerminalCard tdc = system.getTenDaysCard(CardTypes.COMMON);
        LimitedCard tc = system.getTenTripsCard(CardTypes.STUDENT);
        
        system.printAllData();
        
        for (int i = 0; i < 7; i++) {
            tourniquet.checkPass(ftc);
            tourniquet.checkPass(tdc);
        }
        
        for (int i = 0; i < 2; i++) {
            tourniquet.checkPass(tdc);
            tourniquet.checkPass(mc);
        }
        
        tourniquet.checkPass(sc);
        sc.addMoney(5);
        for (int i = 0; i < 4; i++) {
            tourniquet.checkPass(sc);
        }
        
        system.printAllCardsByTypes();
        system.printRecordsByCardTypes();
    }
}
